package com.taoist_awei.blog.infrastructure.data;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.taoist_awei.blog.core.UserEntity;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserData {
    private String username;
    private String email;
    private String introduce;
    private String userImage;
    private String location;

    public UserData(UserEntity userEntity) {
        this.email = userEntity.getEmail();
        this.introduce = userEntity.getIntroduce();
        this.location = userEntity.getLocation();
        this.userImage = userEntity.getUserImage();
        this.username = userEntity.getUsername();
    }
}
